#define _CRT_SECURE_NO_WARNINGS 0
#include<cstdio>
#include<iostream>
#include<stdio.h>
using namespace std;
#define MAXSIZE 100
int arr[MAXSIZE];
void search(int a[], int x) {
	int i;
	for ( i=0; i < MAXSIZE; ++i){
		if (arr[i] == x) {
			printf("YES\n");
			break;
		}
	}
	if (i == MAXSIZE)
	{
		printf("NO\n");
	}
	return;
}
int main() {
	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; ++i)
	{
		scanf("%d", &arr[i]);
	}
	int m;
	scanf("%d", &m);
	while(m--) {
		int target;
		scanf("%d", &target);
		search(arr, target);
	}
	return 0;
}